home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
asmutil
/
coreaids.zip
/
COREAIDS.DOC
< prev
next >
Wrap
Text File
|
1987-06-26
|
47KB
|
975 lines
CoreAids Macro Assembler Subroutine Library Utilities
Copyright 1987, CoreTechs
You are free to use, copy and distribute CoreAids providing that:
NO FEE IS CHARGED FOR USE, COPYING OR DISTRIBUTION.
IT IS NOT MODIFIED IN ANY WAY.
These subroutines are provided AS IS without any warranty,
expressed or implied, including but not limited to fitness for a
particular purpose.
Please send comments, suggestions and contributions to:
CoreTechs
P.O. Box 6207
Silver Spring, MD 20906
SECTION I. ROUTINES LISTED ALPHABETICALLY
ALOC_CHG.ASM 6/25/87 902
DESC: Modifies Allocated memory block size V1.00
IN: *{BLOCK} segment address of memory block to be modified
*{PARA} new requested block size in paragraphs {ie multiples
of 16 bytes}
SAMPLE: Callm ALOC_CHG,<BLOCK,PARA>,
ATRB_WRT.ASM 6/25/87 2268
DESC: Writes character attributes to the screen V1.00
IN: *{PAGE} page number (0-3) 4 available pages in 80 column mode
*{ROWCOL} row(0-24),col(0-79) (ie 0345 indicating fourth row,
46th column)
*{ATRB} attribute (see technical reference manual for
information on color graphics adapter)
*{NUM_CHARS} # of chars to be affected
SAMPLE: Callm ATRB_WRT,<PAGE,ROWCOL,ATRB,NUM_CHARS>,
CHAR_GET.ASM 6/25/87 771
DESC: gets a character from the keyboard V1.00
IN: *{REQ_TYPE} (0:get character,1:see if character
is there,2:get shift status)
OUT: *{CHAR} character ( high byte is shift status,
low byte is char.)
SAMPLE: Callm CHAR_GET,<REQ_TYPE>,<CHAR>
CHG_DIR.ASM 6/25/87 821
DESC: Changes to a new directory using the path provided V1.00
IN: *{SEG_VAL} segment and
*{OFFSET} offset of path string
SAMPLE: Callm CHG_DIR,<SEG_VAL,OFFSET>,
CHG_MOD.ASM 6/25/87 1211
DESC: Changes the mode of a file V1.00
(ie archived, hidden, system)
IN: *{SEG_VAL} segment and
*{OFFSET} offset of filename
*{FUNC_CODE} function code(1:set mode,0:get mode)
*{FILE_MODE} mode of file (1:read only,2:hidden file,
4:system file,8:volume label,10H:sub-directory,
20H:archived file
OUT: *{CMODE} mode of file after completions of call
SAMPLE: Callm CHG_MOD,<SEG_VAL,OFFSET,FUNC_CODE,FILE_MODE>,<CMODE>
CLEAR.ASM 6/25/87 524
DESC: Clears the screen V1.00
SAMPLE: Callm CLEAR,,
CLOSE.ASM 6/25/87 693
DESC: Closes a file handle V1.00
IN: *{INHNDL} handle of file to be closed
SAMPLE: Callm CLOSE,<INHNDL>,
COPY.ASM 6/25/87 2768
DESC: Copies existing file to new or existing file V1.00
using complete path names
IN: *{OUT_SEG_VAL} segment and
*{OUT_OFFSET} offset of new filename
*{IN_SEG_VAL} segment and
*{IN_OFFSET} offset of old filename
SAMPLE: Callm COPY,<OUT_SEG_VAL,OUT_OFFSET,IN_SEG_VAL,IN_OFFSET>,
CREATE.ASM 6/25/87 1009
DESC: Creates a new data file V1.00
IN: *{SEG_VAL} segment and
*{OFFSET} offset of filename to be created as ASCIIZ string
*{ATRB} attribute or mode of file as listed in CHG_MOD
command
OUT: *{OUTHNDL} handle of file created
SAMPLE: Callm CREATE,<SEG_VAL,OFFSET,ATRB>,<OUTHNDL>
CURS_GET.ASM 6/25/87 938
DESC: Gets Cursor Position V1.00
IN: *{PAGE_NUM} page number (0-7) in 40 character mode
or (0-3) in 80 character mode (i.e. 0003) is page 4
OUT: *{ROWCOL} row (0-24),col (0-79) (i.e. 0104)
1st row, 5th column
*{CURS_MODE} cursor mode (see manual for description)
SAMPLE: Callm CURS_GET,<PAGE_NUM>,<ROWCOL,CURS_MODE>
CURS_SET.ASM 6/25/87 883
DESC: Sets Cursor Position V1.01
IN: *{ROWCOL} row and column to postion cursor
row (0-24),col (0-79) (i.e. 0104)
1st row, 5th column
*{PAGE_NUM} page number (0-7) in 40 character mode and (0-3)
in 80 character mode (i.e. 0003) is page 4
SAMPLE: Callm CURS_SET,<ROWCOL,PAGE_NUM>,
DATE_GET.ASM 6/25/87 1482
DESC: Gets the system date V1.00
OUT: *{SEG_VAL} segment and
*{OFFSET} offset of system date in format MM/DD/YY
SAMPLE: Callm DATE_GET,<SEG_VAL,OFFSET>,
DELETE.ASM 6/25/87 822
DESC: Deletes a file V1.00
IN: *{SEG_VAL} segment
*{OFFSET} offset of filename to be deleted
SAMPLE: Callm DELETE,<SEG_VAL,OFFSET>,
ERRORMSG.ASM 6/25/87 5589
DESC: Prints DOS error messages 1-18 and additional user V1.01
supplied messages from 19 up. If the value of ERR_NUM is
0 control returns to the calling program with no effect.
If ERR_NUM is greater than the value of the maximum error
message then the message "No Error for This Value" is
displayed and control returns to DOS. If an error code is
displayed then control also returns to DOS. The memory
address where the error occured is displayed on exit.
IN: *{ERR_NUM} error number where the possible legal values are:
1......Invalid Function Number
2......File Not Found
3......Path Not Found
4......Too Many Open Files (no handles left)
5......Access Denied
6......Invalid Handle
7......Memory Control Blocks Destroyed
8......Insufficient Memory
9......Invalid Memory Block Address
10......Invalid Environment
11......Invalid Format
12......Invalid Access Code
13......Invalid Data
14......This Error Does Not Exist
15......Invalid Drive Was Specified
16......Attempted To Remove The Current Directory
17......Not Same Device
18......No More Files
19......No Room For File(s) On Target Disk
20......No Filename(s) Specified
21......No Volume Label On Disk
22......Wrong Number of Parameters
>22.....No Error for This Value
SAMPLE: Callm ERRORMSG,<ERR_NUM>,
EXECUTE.ASM 6/25/87 2336
DESC: Loads and Executes another program V1.00
IN: *{SEG_VAL} segment and
*{OFFSET} offset of filename to run including extension
*{PAR_HI} high word and
*{PAR_LO} low word of pointer to command line
to be passed to new program. Command line should be in the
form N,' ',PARAM,0DH where N is the length of PARAM+1, and is
followed by a space. PARAM is the command line and 0DH is
a carriage return ending the line.
*{MEMBLK} segment value of last memory control block
segment is typically the val